/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.menosehmais.framework.presentation;

import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.Validator;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author Rafael Quintino
 */
public abstract class AbstractRestController {
    
    protected final HttpServletRequest request;
    protected final Result result;
    protected final Validator validator;
    
    public AbstractRestController(HttpServletRequest request, Result result, Validator validator) {
        this.request = request;
        this.result = result;
        this.validator = validator;
    }
    
    protected <T> Class<RestResponseController<T>> getRestResponseControllerClass() {
        RestResponseController<T> restController = new RestResponseController<T>( result );
        return (Class<RestResponseController<T>>)restController.getClass();
    }
    
}
